var mongoose = require('../dao/mongo/mongo');
var Schema = mongoose.Schema;
var levelSchema = new Schema({
  //用户id
  uid: {
    type: String,
    tags: {type: [String], index: true}
  },
  // 层数
  level_num: {
    type: Number,
    default: 1
  },
  // 每秒产金币数量
  product: {
    type: Number,
  },
  // 矿坑等级
  floor_level: {
    type: Number,
    default: 1
  },
  //升级所需金币数
  upgrade_need: {
    type: Number,
    default: 0
  },
  level_max: {
    type: Number,
    default: 25
  }
}, {
  collection: "userLevel"
});

module.exports = mongoose.model('Level', levelSchema);